/****************************************************************************
 * Elisa 1.0                                                                *
 *--------------------------------------------------------------------------*
 * Author: Laurent Granvilliers, Vincent Sorin                              *
 * Copyright (c) 2004 Laboratoire d'Informatique de Nantes Atlantique       *
 *--------------------------------------------------------------------------*
 * Elisa is distributed WITHOUT ANY WARRANTY. Read the associated           *
 * COPYRIGHT file for more details.                                         *
 *--------------------------------------------------------------------------*
 * elisa_constant.h                                                         *
 ****************************************************************************/

/**
 * @file elisa_constant.h
 * @brief Base classes for constants.
 */

#ifndef _elisa_constant_h_
#define _elisa_constant_h_ 1

#include <iostream>
#include "elisa_defs.h"

NAMESPACE_ELISA
/**
 * @ingroup Constant
 * @class Constant
 * @brief constant used in expressions
 */
class Constant
{
public:
	/**
 	 * @brief Constructors
 	 */
	Constant()
	{
	}

	/**
 	 * @brief Destructor
 	 */
	virtual
	~Constant()
	{
	}

	/**
 	 * @brief Print the value of the constant in the stream
 	 * @var o the stream where the value must be printed
 	 */
	virtual void print(std::ostream & os) const = 0;


protected:
	// copy protection
	Constant(const Constant & right)
	{
	}
	Constant & operator=(const Constant & right)
	{
	}
};
END_NAMESPACE_ELISA

/**
 * @relates Constant
 * Print the value of the constant
 */
inline
std::ostream &
operator<<(std::ostream & os,
           const elisa::Constant & r)
{
	r.print(os);
	return os;
}
#endif //ELISA_CONSTANT_H
